#include "leet.h"

string leetString(string instr){
    char stack;
    string out = "";
    for(unsigned int i = 0; (stack = instr.c_str()[i]); i++){
        stack |= 0x20;
        if( stack >= 'a' && stack <= 'z' ){
            switch( stack ){
                case 'a':   out+='4'; break;
                case 'b':   out+="|3"; break;
                case 'c':   out+='('; break;
                case 'd':   out+="|)"; break;
                case 'e':   out+='3'; break;
                case 'f':   out+="|#"; break;
                case 'g':   out+='6'; break;
                case 'h':   out+="[-]"; break;
                case 'i':   out+='1'; break;
                case 'j':   out+="_|"; break;
                case 'k':   out+="|<"; break;
                case 'l':   out+='|'; break;
                case 'm':   out+="|v|";break;
                case 'n':   out+="|\\|";break;
                case 'o':   out+="0"; break;
                case 'p':   out+="|*"; break;
                case 'q':   out+="0_"; break;
                case 'r':   out+="/2"; break;
                case 's':   out+='5'; break;
                case 't':   out+='7'; break;
                case 'u':   out+="L|"; break;
                case 'v':   out+="\\/"; break;
                case 'w':   out+="\\X/"; break;
                case 'x':   out+="><"; break;
                case 'y':   out+="`/"; break;
                case 'z':   out+="7_"; break;
            }
        }else{
            out+=stack;
        }
    }
    return out;
}
